package com.alinesno.cloud.portal.desktop.web.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alinesno.cloud.common.core.service.impl.IBaseServiceImpl;
import com.alinesno.cloud.portal.desktop.web.entity.LinkPathTypeEntity;
import com.alinesno.cloud.portal.desktop.web.repository.LinkPathTypeRepository;
import com.alinesno.cloud.portal.desktop.web.service.ILinkPathTypeService;

/**
 * <p>  服务实现类 </p>
 *
 * @author WeiXiaoJin
 * @since 2019-05-18 14:46:04
 */
@Service
public class LinkPathTypeServiceImpl extends IBaseServiceImpl< LinkPathTypeEntity, String> implements ILinkPathTypeService {

	//日志记录
	@SuppressWarnings("unused")
	private static final Logger log = LoggerFactory.getLogger(LinkPathTypeServiceImpl.class);

	@Autowired
	private LinkPathTypeRepository linkPathTypeRepository ; 
	
	@Override
	public LinkPathTypeEntity findEntityBylinkTypeCode(String linkTypeCode) {
		List<LinkPathTypeEntity> list = linkPathTypeRepository.findByLinkTypeCode(linkTypeCode) ;
		if(list !=null && list.size()> 0) {
			return list.get(0) ; 
		}
		return null ; 
	}

}
